package com.xiaoshuidi.cloud.module.contract.enums.contract;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 合同模板状态的枚举类
 *
 * @author 合房源码
 */
@Getter
@AllArgsConstructor
public enum ContractTemplateStatusEnum {
    CLOSE(0, "关闭"),
    OPEN(1, "开启"),
    ;

    private Integer code;
    private String msg;

    public static String getName(Integer code) {
        for (ContractTemplateStatusEnum c : ContractTemplateStatusEnum.values()) {
            if (c.getCode().intValue() == code.intValue()) {
                return c.msg;
            }
        }
        return null;
    }
}
